public class CheckDogState {
    public static void main(String[] args) {
        Dog yellowDog = new Dog();
        System.out.print("狗在主人前；");
        yellowDog.setState(new SoftlyState());
        yellowDog.show();
        System.out.print("狗在敌人前；");
        yellowDog.setState(new MeetEnemyState());
        yellowDog.show();
        System.out.print("狗在朋友前；");
        yellowDog.setState(new MeetFrindState());
        yellowDog.show();
        System.out.print("狗在同伴前；");
        yellowDog.setState(new MeetAnotherDog());
        yellowDog.show();
    }
}
